package top.goldenyear.porpoise.system.permission.model;

import com.easy.query.core.annotation.EasyAlias;
import com.easy.query.core.annotation.EntityProxy;
import com.easy.query.core.annotation.Navigate;
import com.easy.query.core.annotation.Table;
import com.easy.query.core.enums.RelationTypeEnum;
import com.easy.query.core.proxy.ProxyEntityAvailable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import top.goldenyear.porpoise.system.permission.model.base.BaseAccountRole;
import top.goldenyear.porpoise.system.permission.model.proxy.AccountRoleProxy;

/**
 * Generated by Porpoise.
 *
 * @author airhead
 * @since 2024-10-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Table(value = "system_account_role")
@EntityProxy
@EasyAlias("accountRole")
public class AccountRole extends BaseAccountRole
    implements ProxyEntityAvailable<AccountRole, AccountRoleProxy> {

  @Navigate(
      value = RelationTypeEnum.OneToOne,
      mappingClass = Role.class,
      selfProperty = "roleId",
      targetProperty = "id")
  private Role role;
}
